import { ElNotification,ElMessageBox } from 'element-plus'
import nprogress from "nprogress"

//弹出输入框
export function showPrompt(tip,value=''){
  return ElMessageBox.prompt('Please input your e-mail', '', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    inputValue:value
  })
}

//消息提示
export function success(message,type='success',dangerouslyUseHTMLString=false){
    ElNotification({
        message,
        type,
        dangerouslyUseHTMLString,
        duration: 2000
    })
}

// 弹出框提示
export function showModal(content='提示内容',type='warning',title=''){
    return ElMessageBox.confirm(
        content,
        title,
        {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type,
        }
      )
}

//显示全屏loading
export function showFullLoading(){
  nprogress.start()
}
//隐藏全屏loading
export function hideFullLoading(){
  nprogress.done()
}